package components.scanario.elements {
	import components.scanario.c_scenarioManager;
	import components.scanario.scenaries.c_baseScenario;
	
	import flash.events.Event;
	import flash.events.EventDispatcher;

	public class c_scenarioElem {
		private var _description	: String;
		private var _sm				: c_baseScenario;
		public function c_scenarioElem(a_sm: c_baseScenario, a_description: String) {
			_description 	= a_description;
			_sm				= a_sm; 
			a_sm.addElement(this);
			listenEvents();
		}
		
		protected function doCheck(obj: Object): Boolean {
			return false;
		}
		
		public function get description(): String {
			return _description;
		}
		
		protected function get manager(): c_baseScenario {
			return _sm;
		}
		
		protected function get workspace(): EventDispatcher {
			return manager.workspace;
		}
		
		protected function get active(): Boolean {
			return _sm.curElement == this;
		}
		
		public function dispose(): void {
			removeEvents();
		}
		
		protected function listenEvents(): void {
			
		}
		
		protected function removeEvents(): void {
			
		}
	}
}